var moment = require('moment')
module.exports = {

    vacation: {

        name: String,
        slug: String,
        sku: String,
        description: String,
        priceInCents: Number,
        tags: [String],
        inSeason: Boolean,
        available: Boolean,
        requireWaiver: Boolean,
        maxGuests: Number,
        notes: String,
        packagesSold: Number,
    },

    user: {
        userName: String,
        passwd: String
    },
    book: {
        ctime: {
            type: Date,
            default: Date.now()
        },
        sid: String,
        userId: Number,
        name: String,
        price: Number,
        tags: [String]
    },
    category: {
        "id": Number,
        "title": String,
        "order_id": Number,
        "pid": Number
    },
    "admin": {
        "id": "Number",
        "user_name": "String",
        "password": "String"
    },
    "banner": {
        "id": "Number",
        "banner_name": "String",
        "uploadfile": "String",
        "banner_url": "String",
        "banner_order": "Number"
    },
    "category": {
        "id": "Number",
        "title": "String",
        "order_id": "Number",
        "pid": "Number"
    },
    "custom": {
        "id": "Number",
        "custom_name": "String",
        "custom_parent": "Number",
        "custom_order": "Number",
        "custom_keywords": "String",
        "custom_description": "String",
        "custom_content": "String"
    },
    "download": {
        "ID": "Number",
        "title": "String",
        "body": "String",
        "category": "Number",
        "data": "Date",
        "author": "String",
        "source": "String",
        "language": "String",
        "os": "String",
        "url": "String"
    },
    "download_category": {
        "ID": "Number",
        "title": "String",
        "order_id": "Number"
    },
    "guestbook": {
        "ID": "Number",
        "title": "String",
        "contact": "String",
        "body": "String",
        "message_type": "String",
        "tel": "String",
        "answer": "String",
        "email": "String",
        "data": "Date"
    },
    "link_img": {
        "ID": "Number",
        "title": "String",
        "url": "String",
        "logo": "String",
        "order_id": "String"
    },
    "link_text": {
        "ID": "Number",
        "title": "String",
        "url": "String",
        "order_id": "Number"
    },
    "nav": {
        "id": "Number",
        "nav_name": "String",
        "nav_url": "String",
        "nav_order": "Number",
        "nav_display": "Boolean",
        "nav_open": "String"
    },
    "news": {
        "ID": "Number",
        "title": "String",
        "body": "String",
        "category": "Number",
        "data": "Date",
        "author": "String",
        "source": "String",
        "hits": "Number"
    },
    "news1": {
        "ID": "Number",
        "title1": "String",
        "body": "String",
        "category1": "Number",
        "data1": "String",
        "author": "String",
        "source1": "String",
        "hits": "Number"
    },
    "news2": {
        "ID": "Number",
        "title2": "String",
        "body": "String",
        "category2": "Number",
        "data2": "String",
        "author": "String",
        "source2": "String",
        "hits": "Number"
    },
    "news3": {
        "ID": "Number",
        "title3": "String",
        "body": "String",
        "category3": "Number",
        "data3": "String",
        "author": "String",
        "source3": "String",
        "hits": "Number"
    },
    "news4": {
        "ID": "Number",
        "title3": "String",
        "body": "String",
        "category3": "Number",
        "data3": "String",
        "source3": "String",
        "hits": "Number"
    },
    "news5": {
        "ID": "Number",
        "title5": "String",
        "body": "String",
        "data5": "String",
        "author5": "String",
        "source5": "String",
        "hits": "Number"
    },
    "news6": {
        "ID": "Number",
        "title6": "String",
        "body": "String",
        "category6": "Number",
        "data6": "String",
        "author6": "String",
        "source6": "String",
        "hits": "Number"
    },
    "news_category": {
        "id": "Number",
        "title": "String",
        "order_id": "Number",
        "pid": "Number"
    },
    "news_category1": {
        "id": "Number",
        "title1": "String",
        "order_id1": "Number",
        "pid": "Number"
    },
    "news_category2": {
        "id": "Number",
        "title2": "String",
        "order_id2": "Number"
    },
    "news_category3": {
        "id": "Number",
        "title3": "String",
        "order_id3": "Number"
    },
    "news_category4": {
        "id": "Number",
        "title3": "String",
        "order_id3": "Number"
    },
    "news_category5": {
        "id": "Number",
        "title5": "String",
        "order_id5": "Number"
    },
    "news_category6": {
        "id": "Number",
        "title6": "String",
        "order_id6": "Number"
    },
    "products": {
        "id": "Number",
        "title": "String",
        "body": "String",
        "main_id": "Number",
        "thumbnail": "String",
        "date": "Date",
        "recommendatory": "Number"
    },
    "products_category_main": {
        "main_id": "Number",
        "main_title": "String",
        "order_id": "String"
    },
    "products_category_sub": {},
    "products_order": {},
    "recruitment": {
        "id": "Number",
        "title": "String",
        "sex": "String",
        "age": "String",
        "educational_history": "String",
        "number_of_people": "String",
        "other": "String"
    },
    "resume": {
        "id": "Number",
        "name": "String",
        "title": "String",
        "age": "Number",
        "email": "String",
        "marriage": "String",
        "gender": "String",
        "mobile": "String",
        "data": "Date"
    },
    "site": {
        "id": "Number",
        "site_name": "String",
        "site_contact": "String",
        "site_tel": "String",
        "site_mobile": "String",
        "site_fax": "String",
        "site_qq": "String",
        "site_msn": "String",
        "site_email": "String",
        "site_url": "String",
        "site_address": "String",
        "site_keywords": "String",
        "site_description": "String",
        "site_icp": "String",
        "site_hits": "Number",
        "site_copyright": "String",
        "site_code": "String",
        "site_information": "String"
    },
    noteCate: {
        sid: String,
        sname: String,
        ctime: {
            type: Date,
            default: Date.now()
        }
    },
    noteItem: {
        sid: String,
        cateId: String,
        sname: String,
        snote: String,
        useFlag: Boolean,
        doneFlag: Boolean,
        ctime: {
            type: Date,
            default: Date.now(),
            get: v => moment(v).format("YYYY-MM-DD HH:mm:ss")
            
        }
    },
    noteArticle: {
        sid: String,
        itemId: String,
        sname: String,
        stext: String,
        ctime: {
            type: Date,
            default: Date.now(),
            get: v => moment(v).format("YYYY-MM-DD HH:mm:ss")
        }
    },
    sysConfig: {
        sid: String,
        skey: String,
        svalue: String,
        stext: String,
        deleted: { type: Boolean, default: false},
        ctime: {
            type: Date,
            default: Date.now,
            get: v => moment(v).format("YYYY-MM-DD HH:mm:ss")
        }
    },
    sysSetting: {
        sid: String,
        skey: String,
        svalue: String,
        stype: {type: String, default: 'sys'},
        ctime: {
            type: Date,
            default: Date.now,
            get: v => moment(v).format("YYYY-MM-DD HH:mm:ss")
        }
    },
    walleCate: {
        id: String,
        text: String,
        parent: String,
        parents: Array,
        orderNo: { type: Number, default: 1 },
        ctime: {
            type: Date,
            default: Date.now,
            get: v => moment(v).format("YYYY-MM-DD HH:mm:ss")
        }
    },
    walleArticle: {
        cateId: String,
        sname: String,
        stext: String,
        tags: Array,
        ctime: {
            type: Date,
            default: Date.now,
            get: v => moment(v).format("YYYY-MM-DD HH:mm:ss")
        }
    },

    enote: {
        sid: String,
        tags: Array,
        sname: String,
        snote: String,
        doneFlag: Boolean,
        ctime: {
            type: Date,
            default: Date.now(),
            get: v => moment(v).format("YYYY-MM-DD HH:mm:ss")
            
        }
    },
    edetail: {
        sid: String,
        enoteId: String,
        sname: String,
        snote: String,
        doneFlag: Boolean,
        orderNo: {
            type: Number,
            default: 1,
        },
        ctime: {
            type: Date,
            default: Date.now(),
            get: v => moment(v).format("YYYY-MM-DD HH:mm:ss")
            
        }
    },



}